#include <stdio.h>
#include <string.h>
#define N 10
#define MIN 15
int SeekTable(char str[])
{
    char week[7][MIN]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
    int i;
    for(i=0;i<7;i++)
    {
        if(0==strcmp(str,week[i]))
            return i;
    }
    return -1;
}
void main()
{
    char str[MIN];
    printf("please input what day:\n");
    gets(str);
    if(SeekTable(str)>=0)
    {
        printf("According to the table,the number is %d",SeekTable(str));
    }
    else
        printf("Input incorrectly!");
}
